Pod::Spec.new do |s|
  s.name             = 'YLPaymentKit'
  s.version          = '1.0.0'
  s.summary          = '统一支付处理框架'
  s.description      = <<-DESC
                       支持多种支付方式的统一处理框架，包括Apple IAP、支付宝支付、微信支付等。
                       DESC

  s.homepage         = 'https://gitee.com/hechangVip/YLPaymentKit'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'hechang' => 'hechang@youloft.com' }
  s.source           = { :git => 'https://gitee.com/hechangVip/YLPaymentKit.git', :tag => s.version.to_s }
  
  s.ios.deployment_target = '13.0'
  s.swift_version = '5.0'
  
  # 设置为静态框架
  s.static_framework = true
  
  # 默认子规格
  s.default_subspec = 'Core'
  
  # 核心模块
  s.subspec 'Core' do |ss|
    ss.source_files = 'YLPaymentDemo/YLPaymentKit/Core/*.swift',
                      'YLPaymentDemo/YLPaymentKit/StoreKit/*.swift',
                      'YLPaymentDemo/YLPaymentKit/Models/*.swift',
                      'YLPaymentDemo/YLPaymentKit/Validators/*.swift',
                      'YLPaymentDemo/YLPaymentKit/Processors/IAP/*.swift'
    ss.frameworks = 'Foundation', 'StoreKit'
  end
  
  # 支付宝模块
  s.subspec 'Alipay' do |ss|
    ss.source_files = 'YLPaymentDemo/YLPaymentKit/Processors/Alipay/*.swift'
    ss.dependency 'YLPaymentKit/Core'
    ss.dependency 'AlipaySDK-iOS'
  end
  

end
